<template>
  <div class="container-slot-video-wapper">
    <div class="video-info">
      <h1 :title="value.title" class="video-title">
        <span class="item-title">{{value.title}}</span>
      </h1>
      <div class="video-data">
        <span class="a-crumbs">
          <mivaLink class="iconfont icon-go" color="#999">动画</mivaLink>
          <mivaLink class="iconfont icon-go" color="#999">动画电影</mivaLink>
        </span>
        <span>2020年1月17日 14:13:33</span>
      </div>
      <div class="video-data">
        <span class="view" title="总播放数--">--播放</span>
      </div>
    </div>
    <div class="video-slot">
      <slot>
        <!-- 视频加载失败 -->
        <img alt src="//miva-unmcc.oss-cn-beijing.aliyuncs.com/timg.jpg" />
      </slot>
    </div>
    <div class="video-toolbar">
      <div class="ops">
        <span class="link" title="点赞数0">
          <i class="iconfont icon-like" />
          --
        </span>
        <span class="link" title="收藏人数">
          <i class="iconfont icon-star" />
          --
        </span>
      </div>
      <div class="appeal-text">稿件投诉</div>
    </div>
    <div class="video-desc">
      <div :class="descOpen&&'open' " class="info" v-html="value.description" />
      <div @click="descOpen = !descOpen" class="btn">
        <span>{{descOpen? '收起':'展开'}}</span>
      </div>
    </div>
    <div class="video-tag">
      <ul class="tag-area clearfix">
        <li class="tag">
          <mivaLink class="item-tag">手机游戏</mivaLink>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
    props: {
        value: {
            type: Object,
            default() {
                const obj = {
                    title: '《朝花夕誓：于离别之朝束起约定之花》',
                    description:
            '<h3>剧情简介</h3><p>经为流逝的日月。纬为人们的生业。<br>住在远离尘嚣的土地，一边将每天的事情编织成名为希比奥尔的布，一边静静生活的伊奥鲁夫人民。<br>在15岁左右外表就停止成长，拥有数百年寿命的他们，被称为“离别一族”，并被视为活着的传说。<br>没有双亲的伊奥鲁夫少女玛奇亚，过着被伙伴包围的平稳日子，却总感觉“孤身一人”。<br>他们的这种日常，一瞬间就崩溃消失。追求伊奥鲁夫的长寿之血，梅萨蒂军乘坐着名为雷纳特的古代兽发动了进攻。<br>在绝望与混乱之中，伊奥鲁夫的第一美女蕾莉亚被梅萨蒂带走，而与玛奇亚，蕾莉亚青梅竹马的少年克里姆也失踪了。玛奇亚虽然总算逃脱了，却失去了伙伴和归去之地……。<br>玛奇亚怀着空虚的心灵在黑暗的森林中徘徊。如同被召唤一般，她在那里遇到了刚刚失去双亲的“孤身一人”的婴儿。<br>逐渐成长为少年的艾瑞尔。即使时间流逝也仍然保持少女样貌的玛奇亚。在同样的季节中，经过着不同的时间。在变化的时代当中，两人的牵绊逐渐变化着色调——。<br>两名孤身一人之人的相遇，编织出无可替代的时间的故事。</p>',
                };
                return obj;
            },
        },
    },
    data() {
        return {
            descOpen: false,
        };
    },
};
</script>


<style lang="less">
.container-slot-video-wapper {
  .video-slot {
    position: static;
    user-select: none;
  }
  .video-info {
    margin-bottom: 16px;
  }
  .video-title {
    font-size: 18px;
    font-weight: 500;
    color: #212121;
    line-height: 26px;
    height: 26px;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    .item-title {
      margin-left: -0.5em;
      vertical-align: middle;
    }
  }
  .video-data {
    margin-top: 11px;
    font-size: 12px;
    height: 16px;
    color: #999;
    display: flex;
    align-items: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    span {
      height: 16px;
      color: #999;
    }
    .a-crumbs {
      margin-right: 16px;
      display: flex;
      .iconfont {
        font-size: 12px;
        &::before {
          margin: 0 5px;
          color: #999 !important;
        }
        &:first-child::before {
          display: none;
        }
      }
    }
  }
  .video-toolbar {
    line-height: 30px;
    height: 28px;
    font-size: 14px;
    color: #505050;
    border-bottom: 1px solid #e5e9f0;
    padding-bottom: 12px;
    margin-top: 16px;
    box-sizing: initial;
    .ops {
      float: left;
      height: 24px;
      -ms-user-select: none;
      user-select: none;
    }
    span {
      width: 92px;
      margin-right: 8px;
      cursor: pointer;
      transition: all 0.3s;
      display: inline-block;
      white-space: nowrap;
      color: #505050;
      position: relative;
      i {
        font-size: 28px;
        vertical-align: top;
        margin-right: 6px;
        width: 28px;
        height: 28px;
        color: #757575;
      }
      &:hover {
        color: #f45a8d;
        i {
          color: #f45a8d;
        }
      }
    }
    .appeal-text {
      float: right;
      cursor: pointer;
      font-size: 12px;
      margin-right: 16px;
      color: #505050;
      transition: color 0.3s;
    }
  }
  .video-desc {
    margin-top: 16px;
    .info {
      white-space: pre-line;
      transition: all 0.3s;
      font-size: 12px;
      color: #212121;
      letter-spacing: 0;
      line-height: 18px;
      height: 63px;
      width: 573px;
      overflow: hidden;
    }
    .open {
      height: auto;
    }
    .btn {
      margin-top: 12px;
      font-size: 12px;
      line-height: 18px;
      span {
        cursor: pointer;
        color: #505050;
      }
    }
  }
  .video-tag {
    position: relative;
    clear: both;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e9ef;
    .tag {
      float: left;
      margin: 0 10px 8px 0;
      background: #f4f4f4;
      border-radius: 100px;
      padding: 0 12px;
      font-size: 12px;
      border: 1px solid #f4f4f4;
      height: 22px;
      transition: all 0.3s;
      .item-tag {
        position: relative;
        height: 22px;
        transition: all 0.3s;
        display: inline-block;
        color: #505050;
        line-height: 22px;
        vertical-align: middle;
        z-index: 10;
      }
    }
  }
  .video-data,
  .video-desc,
  .video-tag {
    margin-top: 16px;
  }
}
</style>
